load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("//:protobuf.bzl", "internal_csharp_proto_library", "internal_php_proto_library", "internal_py_proto_library")

filegroup(
    name = "datasets",
    srcs = [
        "dataset.google_message1_proto3.pb",
    ],
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
)

proto_library(
    name = "benchmark_message1_proto3_proto",
    srcs = [
        "benchmark_message1_proto3.proto",
    ],
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
)

cc_proto_library(
    name = "benchmark_message1_proto3_cc_proto",
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
    deps = [
        "benchmark_message1_proto3_proto",
    ],
)

internal_csharp_proto_library(
    name = "benchmark_message1_proto3_csharp_proto",
    srcs = ["benchmark_message1_proto3.proto"],
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
)

java_proto_library(
    name = "benchmark_message1_proto3_java_proto",
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
    deps = [
        "benchmark_message1_proto3_proto",
    ],
)

internal_php_proto_library(
    name = "benchmark_message1_proto3_php_proto",
    srcs = ["benchmark_message1_proto3.proto"],
    outs = [
        "Benchmarks/Proto3/GoogleMessage1.php",
        "Benchmarks/Proto3/GoogleMessage1SubMessage.php",
        "GPBMetadata/BenchmarkMessage1Proto3.php",
    ],
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
)

internal_py_proto_library(
    name = "benchmark_message1_proto3_py_proto",
    srcs = ["benchmark_message1_proto3.proto"],
    visibility = [
        "//benchmarks/datasets:__pkg__",
    ],
)

pkg_files(
    name = "dist_files",
    srcs = glob(["*"]),
    strip_prefix = strip_prefix.from_root(""),
    visibility = ["//benchmarks:__pkg__"],
)
